package controler;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import view.MenuFrame;
import view.ResultFrame;
import model.SimulationSettings;

public class MonteCarlo{

	static MenuFrame mainFrame;
	static ResultFrame resFrame;
	static SimulationSettings settings;
	static MonteCarloSimulation mySimulation; 
	static MonteCarloThreadable myMultiThreadSimulation;
	static GuiListener listener;
	
	
	public static void main(String[] args) {
		
		
		settings = new SimulationSettings();		
		mainFrame = new MenuFrame(settings);		
		resFrame = new ResultFrame();
		listener = new GuiListener();
		
		
		mainFrame.start.addActionListener(listener);
		resFrame.okButton.addActionListener(listener);
		
		myMultiThreadSimulation = new MonteCarloThreadable(MonteCarlo.settings.orderType, 
				MonteCarlo.settings.currentPrice, MonteCarlo.settings.strikePrice, 
				MonteCarlo.settings.timeMaturity, MonteCarlo.settings.interest, 
				MonteCarlo.settings.fees, MonteCarlo.settings.volatility, 
				(int) MonteCarlo.settings.steps, (int) MonteCarlo.settings.simulation);
		mySimulation = new MonteCarloSimulation();
	}


}
